/* This serves as a generic item template
 *
 */

package item;

import item.weapon.Weapon;


public abstract class ItemTemplate implements Comparable<ItemTemplate> {


	private final String name; //the name of the item
	private final int minLvl; //the minimum level of the item
	private final int maxLvl; //the maximum level of the item
	private final int bCost; //the cost of the item
	private final int lCost; //the per level cost of the item
	private final int bWeight; //the weight of the item
	private final int lWeight; //the per level weight of the item.
	private final String spritePath; //the item's sprite path
	private final Rarity rarity; //the rarity of the item


	//basic constructor for constructing a template
	public ItemTemplate(String n, int minl, int maxl, int bc, int lc, int bw,
			int lw, String sP, Rarity r){

		name = n;
		minLvl = minl;
		maxLvl = maxl;
		bCost = bc;
		lCost = lc;
		bWeight = bw;
		lWeight = lw;
		spritePath = sP;
		rarity = r;
	}//9 param constructor


	//returns the name of the item
	public String getName() {

		return name;
	}//getName


	//returns the minimum level of the item
	public int getMinLvl() {

		return minLvl;
	}//getMinLvl


	//returns the max lvl of the item
	public int getMaxLvl() {

		return maxLvl;
	}//getMaxLvl


	//returns the base cost of the item
	public int getbCost(){

		return bCost;
	}//getbCost


	//returns the cost per level of the item
	public int getlCost(){

		return lCost;
	}//getlCost

	//returns the base weight of the item
	public int getbWeight(){

		return bWeight;
	}//getbWeight


	//returns the weight per level of the item
	public int getlWeight(){

		return lWeight;
	}//getlWeight

	
	public String getSpritePath(){
		
		return spritePath;
	}//getSpritePath
	

	//returns the Rarity of the item
	public Rarity getRarity() {

		return rarity;
	}//getRarity


	//returns an integer showing the relationship between this and o
	public int compareTo(ItemTemplate o){

		return this.name.compareTo(o.name);
	}//compareTo


	//returns if the two objects are equal
	public boolean equals(ItemTemplate o){

		return this.name.equals(o.name);
	}//equals

	//returns an instance of the item that is made from this template
	//of level l
	public abstract Item generate(int l);
}//Item
